package com.ztc.ZtcCapitalIncome.service;


import com.aqgj.util.JsonWrapper;
import com.aqgj.util.Pager;
import com.ztc.ZtcCapitalIncome.dao.ZtcCapitalIncomeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;


@Service("ZtcCapitalIncome")
public class ZtcCapitalIncomeManager {

    @Autowired
    ZtcCapitalIncomeDao ztcCapitalIncomeDao;

    /** 获取平台收支明细 -时间段搜索 */
    public HashMap<String,Object> searchCapitalIncome(Integer pageNumber, Integer pageSize, String startDate, String endDate) {
        Pager<HashMap<String,Object>> ztcCapitalIncomeList=ztcCapitalIncomeDao.searchCapitalIncomeList(pageNumber,pageSize,startDate,endDate);
        return JsonWrapper.successPagerWrapper(ztcCapitalIncomeList.getContent(),ztcCapitalIncomeList.getRecordTotal(),ztcCapitalIncomeDao.getTotalCapitalIncome());
    }

    /** 获取全部 */
    public List<Object[]> getAllCapitalIncome() {
        return ztcCapitalIncomeDao.getAllCapitalIncomeList();
    }
}
